package sw6.digipecs.database;

import android.database.sqlite.SQLiteCursor;
import android.database.sqlite.SQLiteCursorDriver;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteQuery;

public abstract class IDCursor extends SQLiteCursor {
	
	// TODO: Update all documentation
	
	protected int mIndexID;

	public IDCursor(SQLiteDatabase db, SQLiteCursorDriver driver,
			String editTable, SQLiteQuery query) {
		super(db, driver, editTable, query);
	}
	
	/**
	 * Get the pictureID from a cursor.
	 * 
	 * This is used in combination with fetchPicture(). This extracts the pictureID from the cursor, that is the unique id of the picture file.
	 * 
	 * @return  A integer containing the image ID.
	 */
	public int getPictureID() {
		return getInt(mIndexID);
	}

}
